<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="{{__PUBLIC__}}/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="{{__PUBLIC__}}/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <!--<link href="{{__PUBLIC__}}/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">-->
	    	<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/hdjs/hdjs.css"/>
	    	<script type="text/javascript" src="{{__PUBLIC__}}/Admin/jquery-1.8.2.min.js"></script>
	    	<script type="text/javascript" src="{{__PUBLIC__}}/hdjs/hdjs.min.js"></script>
	    	<!--上传插件-->
	    <link rel="shortcut icon" href="{{__PUBLIC__}}/Admin/Flat/img/favicon.ico">
	</head>
	<body>
		<!--onsubmit="return hd_submit(this,'{{U('Brand/add')}}','{{U('Brand/index')}}')"-->
		<form method="post" enctype="multipart/form-data">
		<div class="alert alert-success">添加品牌</div>
		<div class="form-group">
			<label for="exampleInputEmail1" style="color: red;">品牌名称</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="" name="bname" value="{{$oldData['bname']}}">
		</div>
		<script type="text/javascript">
			$(function(){
				$('#close_img').click(function(){
//					删除图片
					$('.img_old').remove();
//					给div增加一个input
					$('.input_img').html('<input type="file" name="logo"/>');
				})
			})
		</script>
		<label for="thumb">上传LOGO</label>
		{{if value="$oldData['logo']"}}
		<div class="img_old">
			<img src="{{__ROOT__}}/{{$oldData['logo']}}" alt="" id="logo_img"/>
			<a href="javascript:;" id="close_img">X</a>
			<!--隐藏于，用于，在不修改旧图片的时候，将地址压入数据库-->
			<input type="hidden" name="logo" value="{{$oldData['logo']}}"/>
		</div>
		{{else}}
		<input id="thumb" type="file" name="logo" />
		{{endif}}
		<!--点击X 图片移除，增加一个input-->
		<div class="input_img">
				
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1" style="color: red;">品牌排序</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="" name="bsort" value="{{$oldData['bsort']}}">
		</div>
		<p style="color: red;">是否热门</p>
		<label class="radio-inline">
		  <input type="radio" name="is_hot" id="inlineRadio3" value="0" {{if value="$oldData['is_hot'] eq 0"}} checked="" {{endif}}>否
		</label>
		<label class="radio-inline">
		  <input type="radio" name="is_hot" id="inlineRadio2" value="1" {{if value="$oldData['is_hot'] eq 1"}} checked="" {{endif}}>是
		</label>
		<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
		</form>
	</body>
</html>
